Skip to content

Conversation

revverse
Copy link

@revverse revverse commented Jan 4, 2023

For Postgres 15 database, exporter panic with error:
`panic: Unknown unit for runtime variable: "64kB"

goroutine 25 [running]:
main.(*pgSetting).metric(0xc0005790e0, 0xc0003b9c50?)
/app/cmd/postgres_exporter/pg_setting.go:87 +0x2fc
main.querySettings(0x0?, 0xc0001b4fd0)
/app/cmd/postgres_exporter/pg_setting.go:56 +0x29e
main.(*Server).Scrape(0xc0001b4fd0, 0xc000026011?, 0xd0?)
/app/cmd/postgres_exporter/server.go:121 +0xd7
main.(*Exporter).scrapeDSN(0xc0001bc0c0, 0xc0000ce764?, {0xc000026011, 0x55})
/app/cmd/postgres_exporter/datasource.go:116 +0x1cd
main.(*Exporter).scrape(0xc0001bc0c0, 0xc0000ce660?)
/app/cmd/postgres_exporter/postgres_exporter.go:711 +0x235
main.(*Exporter).Collect(0xc0001bc0c0, 0xc0000ce760?)
/app/cmd/postgres_exporter/postgres_exporter.go:600 +0x27
github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:448 +0x11a
created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather
/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:538 +0xb0b
`
So, MR only add a new unit - 64kB

Signed-off-by: Oleksandr Mysyura <[email protected]>
Copy link
Contributor

@sysadmind sysadmind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks.

@sysadmind
Copy link
Contributor

Fixes #372

@sysadmind sysadmind merged commit 8b8466f into prometheus-community:master Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants